<?php
ob_start();
//
include("include/config.php");
include("include/functions.php");

if(isset($_REQUEST['command'])&& isset($_REQUEST['productid']) && isset($_REQUEST['catid']))
{
	if($_REQUEST['command']=='add' && $_REQUEST['productid']>0){
		$pid=$_REQUEST['productid'];
		$cid=$_REQUEST['catid'];
		addtocart($pid,1);
		header("Cache-Control: no-cache, must-revalidate");
		header("location:items.php?ppid=$cid", true, 302);
				//header("location:home.php");

		exit();
	}
	}
	?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head >
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9"/>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <!-- scheck:x1 -->
    <meta name="description" content="Online Shopping Store in India for Branded Shoes, Clothing &amp; Accessories for Men &amp; Women. Cash on Delivery, END OF SEASON SALE , Free Shipping, 30 day returns.">
    <meta name="keywords" content="Online Shopping India, Branded Shoes, Clothing, Accessories, Fashion wear, Sporting Goods, Branded apparel, Cool T-Shirts, T-shirt Designs,Footwear, Indian Team Jersey, IPL jerseys, Football jerseys, watches, kurtas, kurtis, formal wear, shirts, pants, t">
    <title>Electron</title>
              
<script>
function watermark(inputId,text){
  var inputBox = document.getElementById(inputId);
    if (inputBox.value.length > 0){
      if (inputBox.value == text)
        inputBox.value = '';
    }
    else
      inputBox.value = text;
}

 
 

</script>


<style type="text/css">
#show_info{
	font-size:12px;
}
</style>


<link href="css/menu.css" rel="stylesheet" type="text/css">

        <script>
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-1752831-1']);
        _gaq.push(['_setDomainName', '.myntra.com']);
        var cdn_base = 'http://myntra.myntassets.com';
       var secure_cdn_base = 'https://d6kkp3rk1o2kk.cloudfront.net';
      var s_account= 'myntra-prod2';
        
        var Myntra = Myntra || {};
        Myntra.Data = Myntra.Data || {};
        
        Myntra.Data.userEmail = "";
        Myntra.Data.userFBId ="";
        Myntra.Data.socialAction = 'wishlist';
        Myntra.Data.nonFBRegCouponValue = "1000";
        Myntra.Data.fbRegCouponValue = "1500";
        Myntra.Data.token = "35c1a750151c8b3c15a9807872bcdcc2";
        Myntra.Data.showAutoSuggest = "1";
        Myntra.Data.showAdminAdditionalStyleDetails = "";
		Myntra.Data.cookiedomain = ".myntra.com";
	    Myntra.Data.cookieprefix = "";
        Myntra.Data.loginTimeout = 15000;
        Myntra.Data.enableGuestLogin = 0;
	Myntra.Data.configMode = "prod";
        Myntra.Data.enableSpy = 1;
       	Myntra.Data.spyId = "b96c01e1efc9610e037abd39e0a469b2";
        Myntra.Data.pageName="static";
        Myntra.Data.lazyElems = new Array();
        Myntra.Data.lazySeparator = "#!#";
        Myntra.Data.ServerCheck = "x1";
        Myntra.Data.EmailUUID = "";
        function myntrack(category, action, opt_label, opt_value, opt_noninteraction) {
            var args = Array.prototype.slice.call(arguments);
            if (args.length < 3) { return; }
            args.unshift('_trackEvent');
            _gaq.push(args);
        }
        </script>
    


	    	<script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script>

  	
    <script>
        Remrkt = {}; Remrkt.vizury = {};
        Remrkt.vizury.uid = "";
    

    </script>
</head>
<body>
    <div class="mk-body">
    
    <div class="mk-wrapper">
   


        
	        <div class="mk-carousel-items">
	<!--<section class="mk-site-nav-wrapper">
	
	
	
	
	
</section>-->
<div class="mk-clear"></div>
	<!-- My Myntra Container  -->
<div class="mk-mymyntra-items mk-saved-wrapper mk-hide rs-carousel"><ul class="gray"></ul></div>

<!-- Saved Items Container  -->
<div class="mk-saved-items mk-saved-wrapper mk-hide rs-carousel"><ul class="rs-carousel-runner"></ul></div>

<!-- Recent Items --> 
<div class="mk-recent-items mk-saved-wrapper mk-hide rs-carousel"><ul class="rs-carousel-runner"></ul></div>

<!-- Bag Items --> 
<div class="mk-bag-items mk-saved-wrapper mk-hide rs-carousel"><ul class="rs-carousel-runner"></ul></div></div>                
        
<script>
Myntra.Data.pageName="home";
function addtocart(pid,cid){
	//alert(pid);
		document.form1.productid.value=pid;
		document.form1.command.value='add';
		document.form1.catid.value=cid;
		document.form1.submit();
	}
</script>

		<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
				//Vertical Sliding
				$('.boxgrid.slidedown').hover(function(){
					$(".cover", this).stop().animate({top:'-260px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
				});
				//Horizontal Sliding
				$('.boxgrid.slideright').hover(function(){
					$(".cover", this).stop().animate({left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
				});
				//Diagnal Sliding
				$('.boxgrid.thecombo').hover(function(){
					$(".cover", this).stop().animate({top:'260px', left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
				});
				//Partial Sliding (Only show some of background)
				$('.boxgrid.peek').hover(function(){
					$(".cover", this).stop().animate({top:'90px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
				});
				//Full Caption Sliding (Hidden to Visible)
				$('.boxgrid.captionfull').hover(function(){
					$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'260px'},{queue:false,duration:160});
				});
				//Caption Sliding (Partially Hidden to Visible)
				$('.boxgrid.caption').hover(function(){
					$(".cover", this).stop().animate({top:'70px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'230px'},{queue:false,duration:160});
				});
			});
		</script>
		
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
 
  <script src="lib/jquery.js" type="text/javascript"></script>

<style type="text/css">
#show_info{
	font-size:12px;
}
	.box{
	border: solid 0.1em #8399AF;
margin-left:6px;
	height:265px;
						width: 180px; 

}
			.boxgrid{ 
				width: 154px; 
				height: 184px; 
				margin:10px; 
				float:left; 
				background:#161613; 
			/*	border: solid 2px #8399AF; */
				overflow: hidden; 
				position: relative; 
			}
				.boxgrid img{ 
					position: absolute; 
					top: 0; 
					left: 0; 
					border: 0; 
				}
				.boxgrid p{ 
					padding: 0 10px; 
					color:#afafaf; 
					font-weight:bold; 
					font:10pt "Lucida Grande", Arial, sans-serif; 
				}
				
			.boxcaption{
 -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    border: 1px solid;
	margin-left:20px;
				position: absolute; 
				background:#0066CC; 
				height:25px; 
				width: auto; 
				opacity: .8; 
				/* For IE 5-7 */
				filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
				/* For IE 8 */
				-MS-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
 			}
 				.captionfull .boxcaption {
 					top: 260;
 					left: 0;
 				}
 				.caption .boxcaption {
 					top: 220;
 					left: 0;
 				}
				
				
.over{
/*//color:#003399;
*/}
.leftmenu{
font-size:13px;
/*//
*/}
.leftmenu li{
	
line-height:25px;
letter-spacing:normal;
}
.leftmenu li a{
text-decoration:none;
}
.leftmenu li:hover { background-color: #667987;
color:#FFF; }
.leftmenu li a:hover { 
color:#fff; }


</style>
<script src="js/camerfilter.js" type="text/javascript"></script>
<div class="mk-one-column home-page">
<table width="100%"><tr>
<td valign="top">
<div style="height:auto; width:190px; border:solid 1px #999999">
<table width="100%" >
				<tr bgcolor="#CCCCCC" style="color:#004040; line-height:30px">

        <td>&nbsp;&nbsp;&nbsp;Categories</td></tr>
<tr><td>
<input type="hidden" name="url" id="url" value="electronics.php" />
<ul  class="leftmenu">
<?php 

	if(isset($_REQUEST['q']))
	{
		$x=explode('@',$_REQUEST['q']);
		$catid=$x[0];
		$range=$x[1];
		$brand=$x[2];
		//$subcatid=$x[3];
	}
	?>
	
	<input type="hidden" name="subid" id="subid" value="<?php if(isset($_REQUEST['subid'])) {echo $_REQUEST['subid'];}
	else
	{
	if(!empty($subcatid)){echo $subcatid; }} ?>" />

	<?php
		$result=mysql_query("select * from subcategory where maincatname='Electornics' "); 
		$no=mysql_num_rows($result);
		if($no>0)
		{
		$count=0;
		while($rec=mysql_fetch_assoc($result))
		{	?>
		
		<li>&nbsp;&nbsp;&nbsp;<input type="radio" name="cat[]" value="<?php echo $rec['subcatid']; ?>" onclick="funqry();" 
         <?php if(!empty($catid))
		{
		if($catid==$rec['subcatid'])
		{
		echo "checked='checked'";	
			
		}
		}
		else
		{
			if(isset($_REQUEST['subid'])){
			if($_REQUEST['subid']==$rec['subcatid'])
		{			
		echo "checked='checked'";	
		}
			}
			
		} ?>>&nbsp;<?php echo $rec['subcatname']; ?></li>
		<?php
		}
		
		}
		?>
		</ul></td></tr>
		<tr bgcolor="#CCCCCC" style="color:#004040; line-height:30px">
<td>&nbsp;&nbsp;&nbsp; Price Range</td></tr>

		<tr ><td>
		<ul  class="leftmenu">
	<li>&nbsp;&nbsp;&nbsp;<input type="radio" name="range[]" value="0-2" onclick="funqry()" 
          <?php if(!empty($range))
		{
		if($range=='0-2')
		{
		echo "checked='checked'";	
			
		}
		}  ?>
    >&nbsp; below 200</li>
	<li>&nbsp;&nbsp;&nbsp;<input type="radio" name="range[]" value="2-5" onclick="funqry();" 
          <?php if(!empty($range))
		{
		if($range	=='2-5')
		{
		echo "checked='checked'";	
			
		}
		}  ?>
    >&nbsp;200 - 500</li>
	<li>&nbsp;&nbsp;&nbsp;<input type="radio" name="range[]" value=">-5" onclick="funqry();"  
              <?php if(!empty($range))
		{
		if($range=='>-5')
		{
		echo "checked='checked'";	
			
		}
		}  ?>
    >&nbsp;500 above </li>
	</ul>
	
	</td></tr>
		<tr bgcolor="#CCCCCC" style="color:#004040; line-height:30px">
<td>&nbsp;&nbsp;&nbsp;brands</td>
		</tr>

    <tr><td>
 		<ul  class="leftmenu">
   
    	<?php
		$result=mysql_query("select DISTINCT(brand) from items where maincatname='electronics'"); 
		$no=mysql_num_rows($result);
		if($no>0)
		{
		$count=0;
		while($rec=mysql_fetch_assoc($result))
		{	?>
		
		<li>&nbsp;&nbsp;&nbsp;<input type="radio" name="brand[]" value="<?php echo $rec['brand']; ?>" onclick="funqry();" 
         <?php if(!empty($brand))
		{
		if($brand==$rec['brand'])
		{
		echo "checked='checked'";	
			
		}
		}
	 ?>
    >&nbsp;<?php echo $rec['brand']; ?></li>
		<?php
		}
		
		}
		?>
		</ul></td></tr>
        

	
	</table>
</div>
</td>

<td width="79%" valign="top">

<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
 
  <script src="lib/jquery.js" type="text/javascript"></script>
  <script src="src/facebox.js" type="text/javascript"></script>
  <script type="text/javascript">
    jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox({
        loadingImage : 'src/loading.gif',
        closeImage   : 'src/closelabel.png'
      })
    })
  </script><div id="show_info" >
<table >		<tr height="272px">

	<?php
	$sqlQuery="select * from items where maincatname='electornics'";
	if(isset($_REQUEST['subid']))
	{
		$id=$_REQUEST['subid'];
	$data=mysql_query("select subcatname from subcategory where subcatid=$id");
	if($data)
	{
		while($rec=mysql_fetch_assoc($data))
		{
			$name=$rec['subcatname'];
			$sqlQuery ="select * from items where maincatname='electornics' and subcatname='$name'";
		}
		
	}
	}
			

	if ( !empty($catid))
	{
	$data=mysql_query("select subcatname from subcategory where subcatid=$catid");
	if($data)
	{
		while($rec=mysql_fetch_assoc($data))
		{
			$name=$rec['subcatname'];
			$sqlQuery ="select * from items where maincatname='electornics' and subcatname='$name'";
		}
		
	}
	// echo $sqlQuery;
	 }
//	//$sqlQuery=select * from items
	if ( !empty($brand) ) $sqlQuery .= " and brand='$brand'";
	if ( !empty($range) )
	{
	$y=explode("-",$range);
	if($y[0]=='>')
  { $y[1]=$y[1]*100;
  
	 $sqlQuery .= " and cost>'".$y[1]."'";
  }else
  {
	  $y[1]=$y[1]*100;
  $y[0]=$y[0]*100;
	 $sqlQuery .= " and cost BETWEEN '".$y[0]."' and '".$y[1]."'";
	
  }
  }
 $sqlQuery.='and available>0 order by cost';
 // echo $sqlQuery;
		$result=mysql_query($sqlQuery);

		$no=mysql_num_rows($result);
		if($no>0)
		{
		$count=0;
		while($rec=mysql_fetch_assoc($result))
		{	
		 if($count<=3) { ?>
		
		
		<td >
			<div class="box">
				<div class="boxgrid caption">
				<a href="description.php?id=<?php echo $rec['itemid']; ?>"><img src="<?php echo "admin/".$rec['imagepath']; ?>" width="154" height="185"/></a>
				<div class="templatemo_pizza_box"><a href="large.php?id=<?php echo $rec['itemid']; ?>" style="text-decoration:none" rel="facebox">
				<div class="cover boxcaption">
				<h3 style="margin: 5px 5px 0px 5px; color:#fff; text-align:center; font:12pt Arial, sans-serif; letter-spacing:-1px; font-weight: bold; " >Quick Look</h3>
				</div>
				</a></div>
			</div>
			&nbsp;&nbsp;&nbsp;	
		   <?php echo $rec['itemname'];?>
		  <br />&nbsp;&nbsp;&nbsp;
           Price:<big style="color:green">$
                    	<?php echo $rec['cost'];?></big><br>		
												Available:&nbsp;(<?php echo $rec['available']; ?>)

                            <span style="margin-left:50px; margin-bottom:5px"></span></div>
          </td>
          <?php
	  $count++;
	  }
	  else
	  {
	 echo "</tr><tr height='272px'>";
	  
	  
	  ?>
		<td>
			<div class="box">
				<div class="boxgrid caption">
				<a href="description.php?id=<?php echo $rec['itemid']; ?>"><img src="<?php echo "admin/".$rec['imagepath']; ?>" width="154" height="180"/></a>
				<div class="templatemo_pizza_box"><a href="large.php?id=<?php echo $rec['itemid']; ?>" style="text-decoration:none" rel="facebox">
				<div class="cover boxcaption">
				<h3 style="margin: 5px 5px 0px 5px; color:#fff; text-align:center; font:12pt Arial, sans-serif; letter-spacing:-1px; font-weight: bold; " >Quick Look</h3>
				</div>
				</a></div>
			</div>
			&nbsp;&nbsp;&nbsp;	
		   <?php echo $rec['itemname'];?>
		  <br />&nbsp;&nbsp;&nbsp;
           Price:<big style="color:green">$
                    	<?php echo $rec['cost'];?></big><br>						Available:&nbsp;(<?php echo $rec['available']; ?>)

                            <span style="margin-left:50px; margin-bottom:5px"></span></div>
          </td>
	  <?php $count=1;
	  		  }
			 }
			  }
?>
</table></div>

</td></tr>
</table>
</div>

        <ul class="mk-feature-page-touts mk-clear">
</ul> <!-- End .category-page-touts -->            	<footer class="mk-site-ft mk-cf" style="background-color:#666666; color:#FFFFFF">
<div class="mynt-footer">
	<hr class="main" />
    <div class="footer-content">
    	        <div class="mynt-links-block">
            <div class="mynt-footer-links">
            <table width="100%"><tr style="text-align:center"><td>
                <ul>
                    <li><strong>POLICES</strong></li>
                    						<li><a href="corporateoffers.php">corporate offers</a></li>
                                            <li><a href="privacy.php" >Privacy</a></li>
                                            <li><a href="returnpolicy.php" >Return Policy</a></li>
											
                   </ul>
                                                            
                                                            </td>
                   
                    
                      <td valign="top"><ul>
					
                    <li><strong class="mt20">PAYMENT METHODS</strong></li>
                    <li><a href="">Creadit Card</a></li>
                    <li><a href="">Debit Card</a></li>
                    <li><a href="" >NetBanking</a></li>
                    <li><a href="">Cash on Delivery</a></li>
                        </ul>
                    </td>     
                    
                    <td valign="top">
                    <ul>

                    <li><strong>Electron</strong></li>
                    <li><a href="login.php">Login/Sign up</a></li>
                    <li><a href="contactus.php" >Contact Us</a></li>
                </ul></td>
				<td><br /><br />
				<a href="" onclick="window.open('myfacebook.php','myfacebook','height=520,width=310')"><img src="img/fbfan.jpg" /></a>
				</td>
				
				</tr></table>
            </div>
            
        </div>
        <hr />
    	     
        
        <div class="mynt-text">
            <div class="mynt-foot-title">ABOUT Electron</div>
            Electron is India's premier online shopping site that offers customers and bulk buyers option to purchase unused, branded factory seconds, surplus, overstock, and refurbished products at the lowest prices – guaranteed . We have over 70 stores and plan to have over 100 within 6 months.  <br />
            Our products come with warranty and supported by a world class pan India services network.  We support multiple payment options when you look for amazing deals on all popular brand.  Electron is the destination for buyers who are looking for a reliable and trustworthy place to shop for killer deals on factory seconds.  By shopping with us you are also supporting the environment and a greener, healthier future for our kids as we strive to reduce waste that would have otherwise polluted the environment.  Come, shop with us today and be part of over 1 Million happy customers who have pledged to make a difference..<br>
        </div>
		
     
        <div class="mynt-copy-right">
            &copy; electron.com / All rights reserved
        </div>
            </div>
</div>

<div id="fb-root"></div>

<!-- @Footer-->


</footer>
        
    </div>
    </div>
   


    	<div id="cart-combo-overlay" class="cart-combo-overlay lightbox">
<div class="mod">
	<div class="hd">COMBO OFFER</div>
    <div class="bd clearfix">
    </div>
  	<div class="ft"></div>
</div>
</div>

	<div id="quick-look-mod" class="lightbox">
<div class="mod">
	<div class="hd"></div>
    <div class="bd clearfix">
    </div>
  	<div class="ft">
		<span class="cps">100% Original Products &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Free Shipping on Orders over Rs. 799 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cash on Delivery &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30-Day Returns</span>
  	</div>
</div>
</div>

            <script type="text/javascript" src="js/common-1354034304.js.jgz"></script>
        <script type="text/javascript" src="js/home-1354034304.js.jgz"></script>
    

    			<script language="JavaScript" type="text/javascript">

var omnistat = {"eVar24":"new-userType:new","pageName":"home","channel":"home","prop1":"home","prop2":"home","prop3":"home","eVar16":"logged out","eVar15":""};

s.pageName=omnistat.pageName;

s.server="";

s.channel=omnistat.channel;

s.pageType="";



/* Conversion Variables */

s.campaign=omnistat.campaign;

s.state="";

s.zip="";

s.events=omnistat.events;

s.products=omnistat.products;

s.purchaseID=omnistat.purchaseID;



for (var i in omnistat) {

	if (/(prop|eVar)\d+/.test(i)) {

		s[i] = omnistat[i];

	}

}



s.eVar1="";

s.eVar2="";



// Setting s to s_analytics global variable as s is getting unset by some peice of code b/w here 

// and afterOnLoad function call in custom.js

var s_analytics = s;

var s_analytics_firesync = false;

if(s_analytics_firesync) {

	s_analytics.t();

}

</script>



	
	 

    <!-- Google Code for Smart Pixel -->
        <noscript>
        <div style="display:inline;">
        <img height="1" width="1" style="border-style:none;" alt="" />
        </div>
        </noscript>


    <script type="text/javascript">
                            _gaq.push(["_setCustomVar", 1, "LoginSplash", "control", 1]);_gaq.push(["_setCustomVar", 5, "loginbox", "v3", 1]);_gaq.push(["_setCustomVar", 2, "boostedSearch", "control", 1]);/*MAB GA CALLS*/
        	_gaq.push(['_trackPageview']);
	_gaq.push(['_trackPageLoadTime']);
	</script>
    

	<script src="/skin2/js/json2.js" type="text/javascript"></script>

          <script type="text/javascript">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push(["load",new Date().getTime()]);var e=document.createElement("script");e.type="text/javascript";e.src=(("http:"===document.location.protocol)?"http:":"https:")+"//"+"d1ros97qkrwjf5.cloudfront.net/42/eum/rum.js";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push(["nrfj","beacon-1.newrelic.com","8d69094dad","892343","NFwEMEVZCkcHAhcLXQ0WMxZeFxRYBxUFDUAOFgULWUwWWwoNBhBBTHEJCVJoBVMDIgwMRhFWCghSSkpEDhE=",0,111,new Date().getTime(),"","","","",""]);
</script>    

   <form name="form1" >
	<input type="hidden" name="productid" />
    <input type="hidden" name="command" />
    <input type="hidden" name="page" />
</form> 
</body>
</html>
 <?php
  //Assign all Page Specific variables
  $pagemaincontent = ob_get_contents();
  ob_end_clean();
  $pagetitle = "Electron";
  //Apply the template
  include("master.php");
?>
<?php ob_flush();
?>